<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateOrderTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('order', function (Blueprint $table) {
            $table->increments('id');
            $table->string('order_sn')->default('')->comment('编号');
            $table->string('trade_no')->default('')->comment('流水号');
            $table->integer('uid')->comment('用户id');
            $table->char('phone')->comment('手机号');
            $table->tinyInteger('order_type')->comment('订单类型');
            $table->string('pay_price')->default('')->comment('支付金额');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('order');
    }
}
